home *** CD-ROM | disk | FTP | other *** search
- on typeakey
- set vTemp to EMPTY
- set cr to numToChar(13)
- repeat while the keyCode <> cr
- set vTemp to vTemp & the keyCode
- end repeat
- set vName to "athletelist"
- end
-
- on liteled
- global ghfathlete, gHFposition, ghfslideno
- set the itemDelimiter to ","
- set vnumofslides to item 3 of getaProp(ghfathlete, gHFposition)
- puppetSprite(15, 1)
- set the castNum of sprite 15 to cast ("LED0" & value(ghfslideno))
- updateStage()
- end
-
- on getposition
- global gHFline, gHFsearchcastmember, ghfmaxathleteno, gHFposition
- put "Duck 1" && gHFposition
- SetCursor(#wait)
- set ghfathleteno to item 2 of getaProp(ghfathlete, gHFposition)
- paintscreen()
- go("first")
- SetCursor(#normal)
- return
- set the itemDelimiter to numToChar(13)
- set vNum to the number of cast value(gHFsearchcastmember)
- set vlines to the number of lines in field vNum
- repeat with vcounter = 1 to gHFline
- set vName to item vcounter of field vNum
- end repeat
- set vFound to 1
- repeat while vFound <= ghfmaxathleteno
- set vTemp to getaProp(ghfathlete, vFound)
- if vTemp contains vName then
- set the itemDelimiter to ","
- set ghfathleteno to item 2 of getaProp(ghfathlete, vFound)
- set gHFposition to vFound
- set vFound to 999
- end if
- set vFound to vFound + 1
- end repeat
- paintscreen()
- go("first")
- SetCursor(#normal)
- end
-
- on bkRolloverScript
- global gLastSprite
- set vNowSprite to 0
- if rollOver(36) then
- set vNowSprite to 36
- end if
- if rollOver(37) then
- set vNowSprite to 37
- end if
- if not (vNowSprite = 0) then
- set vCastNo to the castNum of sprite vNowSprite
- set vCastName to the name of cast vCastNo
- if (vCastName contains "NOOP") or (vCastName contains "DOWN") then
- set vNowSprite to 0
- end if
- end if
- if not (vNowSprite = 0) then
- hRollOverOn(vNowSprite)
- set gLastSprite to vNowSprite
- else
- puppetSprite(gLastSprite, 0)
- set gLastSprite to 0
- end if
- end
-
- on athleteToPosition aAthNum
- global ghfathlete
- set vPos to 1
- set the itemDelimiter to ","
- repeat with vI = 1 to count(ghfathlete)
- if aAthNum = item 2 of getaProp(ghfathlete, vI) then
- set vPos to vI
- exit repeat
- end if
- end repeat
- return vPos
- end
-
- on NumToName aAthNum
- global ghfathlete
- set the itemDelimiter to ","
- repeat with vI = 1 to count(ghfathlete)
- if aAthNum = item 2 of getaProp(ghfathlete, vI) then
- return item 5 of getaProp(ghfathlete, vI)
- end if
- end repeat
- return EMPTY
- end
-
- on GetAthInfo aAthNum
- global gHFaList
- set the itemDelimiter to ","
- repeat with vI = 1 to 285
- if aAthNum = item 2 of getaProp(gHFaList, vI) then
- return getaProp(gHFaList, vI)
- end if
- end repeat
- return EMPTY
- end
-
- on hRolloverScript
- global gLastSprite
- set vNowSprite to 0
- if rollOver(5) then
- set vNowSprite to 5
- end if
- if rollOver(6) then
- set vNowSprite to 6
- end if
- if rollOver(30) then
- set vNowSprite to 30
- end if
- if rollOver(31) then
- set vNowSprite to 31
- end if
- if rollOver(32) then
- set vNowSprite to 32
- end if
- if rollOver(7) then
- set vNowSprite to 7
- end if
- if rollOver(8) then
- set vNowSprite to 8
- end if
- if rollOver(9) then
- set vNowSprite to 9
- end if
- if rollOver(29) then
- set vNowSprite to 29
- end if
- if rollOver(18) then
- set vNowSprite to 18
- end if
- if rollOver(19) then
- set vNowSprite to 19
- end if
- if rollOver(12) then
- set vNowSprite to 12
- end if
- if rollOver(39) then
- set vNowSprite to 39
- end if
- if rollOver(10) then
- set vNowSprite to 10
- end if
- if not (vNowSprite = 0) then
- set vCastNo to the castNum of sprite vNowSprite
- set vCastName to the name of cast vCastNo
- if (vCastName contains "NOOP") or (vCastName contains "DOWN") then
- set vNowSprite to 0
- end if
- end if
- if not (vNowSprite = 0) then
- hRollOverOn(vNowSprite)
- set gLastSprite to vNowSprite
- else
- puppetSprite(gLastSprite, 0)
- set gLastSprite to 0
- end if
- end
-
- on hRollOverOn vNowSprite
- global gLastSprite
- if not (gLastSprite = vNowSprite) then
- set vCastNo to the castNum of sprite vNowSprite
- set vCastNam to the name of cast vCastNo
- puppetSprite(vNowSprite, 1)
- set the castNum of sprite vNowSprite to the number of cast (vCastNam & "-ROLLOVER")
- if not (gLastSprite = 0) then
- puppetSprite(gLastSprite, 0)
- updateStage()
- end if
- else
- nothing()
- end if
- end
-
- on LoadAthleteDB
- global ghfathleteno, gHFathleteDB
- set gHFathleteDB to [:]
- set vCast to 1477 + value(ghfathleteno) - 1
- set vDB to the text of cast vCast
- set the itemDelimiter to ","
- set vlines to the number of lines in vDB
- repeat with vI = 1 to vlines
- set vName to item 1 of line vI of vDB
- set vNum to item 2 of line vI of vDB
- addProp(gHFathleteDB, vName, vNum)
- end repeat
- end
-
- on GetAssetNo aName
- global gHFathleteDB
- set vPos to findPos(gHFathleteDB, aName)
- if voidp(vPos) then
- return -1
- end if
- return value(getAt(gHFathleteDB, vPos))
- end
-